package com.zyj.guava.m3u8;


import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.StandardOpenOption;

public class MergeM3U8 {
    public static void main(String[] args) throws IOException {
        byte[] part1 = Files.readAllBytes(Path.of("E:\\sys\\视频\\dev\\1.ts"));
        byte[] part2 = Files.readAllBytes(Path.of("E:\\sys\\视频\\dev\\2.ts"));
        Files.write(Path.of("E:\\sys\\视频\\dev\\new.mp4"),  part1, StandardOpenOption.CREATE);
        Files.write(Path.of("E:\\sys\\视频\\dev\\new.mp4"),  part2, StandardOpenOption.APPEND);
    }
}
